﻿<%@ Page Title="医院分类汇总统计" Language="C#" MasterPageFile="~/Master/MasterPage_New.master" AutoEventWireup="true"
    CodeBehind="HosPitalGoodsByQT.aspx.cs" Inherits="HZ.Supervise.Web.Secondphase.NewReport.HosPitalGoodsByQT" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Assembly="CommonLib" Namespace="HZ.Web" TagPrefix="rbac" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="tabnav">
        <ul>
            <li><a href="HosPitalGoods.aspx">药品实时汇总统计</a></li>
            <li><a href="HosPitalGoodsByFJC.aspx">非基层医疗机构</a></li>
            <li><a href="HosPitalGoodsByXZ.aspx">乡镇医疗机构</a></li>
            <li><a href="HosPitalGoodsBySQ.aspx">社区医疗机构</a></li>
            <li><a href="HosPitalGoodsByMy.aspx">民营医疗机构</a></li>
            <li class="active"><a href="#">其他医疗机构</a></li>
        </ul>
    </div>
    <div id="tabcontent2">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                <asp:Label ID="labProductName" runat="server" Text="通用名："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtProductName" runat="server"></asp:TextBox>
                                <asp:CheckBox ID="cbProductNameLike" runat="server" Text="精确" ToolTip="按药品通用名精确查询" />
                            </td>
                            <td align="right">
                                <asp:Label ID="labMedicineModel" runat="server" Text="剂型："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtMedicineModel" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="labPack" runat="server" Text="采购规格："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtPack" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="labUnit" runat="server" Text="采购单位："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtUnit" runat="server"></asp:TextBox>
                            </td>
                            <td width="100px" rowspan="2">
                                <hz:HzButton ID="btnQuery" runat="server" Text="查  询" OnClick="btnQuery_Click" CssClass="btn" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="labHospitalName" runat="server" Text="医院名称："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtHospitalName" runat="server"></asp:TextBox>
                            </td>
                            <%--                            <td align="right">
                                <asp:Label ID="lblPinYinCode" runat="server" Text="拼音码："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtPinYinCode" runat="server"></asp:TextBox>
                            </td>--%>
                            <td align="right">
                                <asp:Label ID="lblStartTime" runat="server" Text="开始时间："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtTimeFrom" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblEndTime" runat="server" Text="结束时间："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtTimeTo" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"></asp:TextBox>
                            </td>
                            <td align="right">
                                排序字段：
                            </td>
                            <td style="text-align: left">
                                <asp:DropDownList ID="OrderFileds" runat="server" Width="126px">
                                    <asp:ListItem Value="PurchaseAmountTotal">采购金额(元)</asp:ListItem>
                                    <asp:ListItem Value="WareHouseAmountTotal">入库金额(元)</asp:ListItem>
                                    <asp:ListItem Value="WareHouseRate">入库率</asp:ListItem>
                                    <%--<asp:ListItem Value="SellCount">销售数量</asp:ListItem>--%>
                                    <asp:ListItem Value="SellAmountTotal">销售金额</asp:ListItem>
                                    <asp:ListItem Value="SellRate">销售率</asp:ListItem>
                                </asp:DropDownList>
                                <asp:DropDownList ID="OrderType" runat="server" Width="126px">
                                    <asp:ListItem Value="DESC">降序</asp:ListItem>
                                    <asp:ListItem Value="ASC">升序</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <%--<td align="right">
                                医院等级：
                            </td>
                            <td align="left" colspan="3">
                                <asp:CheckBoxList ID="cblboxlist" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Selected="True" Value="-1">全部</asp:ListItem>
                                    <asp:ListItem Value="1">一甲</asp:ListItem>
                                    <asp:ListItem Value="2">一乙</asp:ListItem>
                                    <asp:ListItem Value="3">二甲</asp:ListItem>
                                    <asp:ListItem Value="4">二乙</asp:ListItem>
                                    <asp:ListItem Value="5">三甲</asp:ListItem>
                                    <asp:ListItem Value="6">三乙</asp:ListItem>
                                </asp:CheckBoxList>
                            </td>--%>
                        </tr>
                        <asp:Literal ID="ltlAdvance" runat="server" Text="&lt;tbody id='advance' style='display:none'&gt;"></asp:Literal>
            </tr>
        </table>
    </div>
    <div>
        <asp:GridView ID="gvwInfo" runat="server" CssClass="mainlist" Width="100%" AutoGenerateColumns="False" EmptyDataText="暂无符合条件的数据！" 
            DataKeyNames="ProcureCatalogID,ProductName">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%# Container.DataItemIndex+1+(AspNetPager1.CurrentPageIndex-1)*AspNetPager1.PageSize %>
                    </ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
                <asp:BoundField DataField="ProcureCatalogID" HeaderText="药品编号" />
                <asp:BoundField HeaderText="医院名称" DataField="HospitalName" />
                <asp:BoundField HeaderText="通用名" DataField="ProductName" />
                <asp:BoundField HeaderText="剂型" DataField="MedicineModelName" />
                <asp:BoundField HeaderText="采购规格" DataField="Pack" />
                <asp:BoundField HeaderText="采购单位" DataField="Unit" />
                <asp:BoundField HeaderText="实际采购价格" DataField="Price" DataFormatString="{0:N3}" />
                <asp:BoundField HeaderText="采购金额" DataField="PurchaseAmountTotal" DataFormatString="{0:N3}" />
                <asp:BoundField DataField="DistributeAmountTotal" HeaderText="配送金额" DataFormatString="{0:N3}" />
                <asp:BoundField DataField="DataRate_PS" HeaderText="配送率" NullDisplayText="NA" />
                <asp:BoundField HeaderText="入库金额" DataField="WareHouseAmountTotal" DataFormatString="{0:N3}" />
                <asp:BoundField HeaderText="入库率" DataField="addDataColumnRate" NullDisplayText="NA" />
                <asp:BoundField HeaderText="销售金额" DataField="SellAmountTotal" DataFormatString="{0:N3}" />
                <asp:BoundField HeaderText="销售率" DataField="addSellRate" NullDisplayText="NA" />
            </Columns>
        </asp:GridView>
    </div>
    <div class="page">
        <span style="width: 30%; float: left; text-align: left">
            <hz:HzButton ID="btnExcel" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel_Click" /></span>
        <span style="width: 70%; float: right; text-align: right">
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged">
            </webdiyer:AspNetPager>
        </span>
    </div>
    <div class="listip">
        <ul>
            <li>统计：<asp:Label ID="lblCount" runat="server" Text="lblCount"></asp:Label>
            </li>
            <li>说明:<span>（1）实时查询数据量庞大，建议静态查询；</span></li>
            <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>（2）由于数据量庞大，请先选择相应条件，点击“查询”按钮。</span>
            </li>
        </ul>
    </div>
</asp:Content>
